In the field of video monitoring, it often involves collecting and processing (such as compressing, encoding and so on) of images by a camera, signal transmitting, analyzing (such as decoding, decompressing) and displaying of an image by a display terminal and the like. However, delay of the collected image (i.e., collecting and displaying are not completely synchronised in real time) appears during the final display due to the problems such as instability of apparatuses, transmission routes (such as network).
Image delay is a key parameter in the field of video monitoring. A shorter image delay represents a better overall performance of video monitoring such as transmission and back-end processing of a camera during video monitoring, and the image delay can reflect the real-time display condition of an image. As a result, it is very important regarding how to accurately measure (or detect) the image delay in a video monitoring environment, which helps to further improve the video monitoring environment and reduce the image delay as much as possible.
At present, a commonly used method for measuring a camera delay (referred to as “image delay” below) is as follows.
Firstly, a timer (precision of which is typically millisecond order of magnitude) is run on a computer, and a camera is arranged to aim to the timer interface on a computer display, and then a client software, which can preview the camera on the computer that is running the timer, is performed. Finally, a screenshot operation is performed for the computer, and the difference (image delay in general sense in the field of video monitoring) between the time of the timer and the time of the client preview picture is calculated according to the screenshot of the camera.
However, the biggest disadvantage of this method is that manual operation is needed for the screenshot operation, which is tedious and time-consuming, and the final step of performing the screenshot operation is susceptible to the computer screen refresh rate, which can lead to an error up to a magnitude of 10 ms. For example, for a display with a refresh rate of 60, if the numbers on a timer are supposed to update at a certain moment, but the camera is performing the screenshot operation at this moment and it is needed to wait for 16.6 ms to refresh due to the screen refresh, then it leads to an error of 16.6 ms, which in turn leads to a larger error for a camera delay.
Moreover, for image data of one frame, the image of this frame is displayed after being collected, encoded, compressed and transmitted. Normally, it is always necessary to carry out buffering for data reception and buffering for playing after decoding, and it is very important to find a particular frame of data (this frame of data records the current collecting time) in a queue of data and play buffering and this parameter should be as accurate as possible. However, a camera and a computer serving as a display terminal both have their own system time. If refresh is carried out now, it will also make the time obtained from a computer screenshot by a camera inaccurate due to the display frequency of the computer, which renders the obtained time inaccurate.
Thus, how to measure the camera delay accurately and automatically is a problem that is urgent to be solved by a person skilled in the art.
In addition, a document of “a method for measuring a one-way delay” in the prior art proposed a technical solution of sending a message from a source endpoint to an target endpoint, then immediately returning, by the target endpoint, the message to the source endpoint, calculating the round-trip time of the message between the two endpoints, then dividing it by two, and then obtaining the one-way delay time. However, in this method, only the delay of message data transmission is considered, data format and content carried by a data packet have no effect on the result in addition to the address information and time information for recording the source and target endpoints, and transmitting and receiving of a message between two endpoints are both carried out synchronously and there is no need to wait at the endpoints. A person skilled in the art knows that the composition or the influencing factors of an image delay at least include: the time for collecting an image, the time for encoding an image, the time for transmitting compressed data, the time for analyzing and decoding compressed data, the time for displaying image data and the like. Image delay in the field of video monitoring is defined as the time difference between the time when a camera starts to collect an image and the time when the display by a display terminal (client/terminal, server and the like) completes for the same frame of picture (i.e., image). However, if data of a frame of picture in a camera are displayed after they are collected, encoded, compressed and transmitted, then buffering for data reception and buffering for playing after decoding are normally carried out, that is to say, the factors in reality that lead to a delay is far more complicated than the factor of only message transmission delay recited in the above document, and thus the method proposed by this prior art is not able to detect the camera delay.
Thus, it is necessary to provide a method and a system capable of automatically and thus more accurately measuring image delay without needs of manual operation.